//
//  AuthSession.swift
//  Link
//
//  Created by melvyn on 2018/11/24.
//

import Foundation

public protocol SessionType: Model {}

public protocol AuthSessionType: SessionType {
    var userID: User.ID { get }
    var username: String { get }
    var token: String { get }
}

public struct AuthSession: AuthSessionType {
    
    public let id: Int
    public let userID: User.ID
    public let username: String
    public let token: String
    
    init(userID: User.ID, username: String, token: String) {
        self.id = -1
        self.userID = userID
        self.username = username
        self.token = token
    }
}
